package com.example.demo_appb

import android.os.Bundle
import android.widget.TextView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat

class DetailActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_detail)
        val tv = findViewById<TextView>(R.id.tv)
        //接受参数
        val data = intent.data
        val goodsId = data?.getQueryParameter("goodsId")
        tv.text = "商品id $goodsId"
    }
}